$(function () {
    $('body').on('click','#updateRealName',function () {
        var realName =$('input[name="realName"]').val();
        if(realName==null||realName==''){$.alert("请输入真实姓名");return;}
        var params = {"realName":realName};
        params = JSON.stringify(params);
        $.ajax({
            url: baseloaction + '/mobile/uc/userInfo/updateUserInfo',
            type: 'post',
            dataType: 'json',
            data: params,
            async: false,
            contentType: 'application/json;charset=utf-8',
            success: function (result) {
                if(result.success){
                    $.alert(result.message,function () {
                        window.location.href=baseloaction+"/mobile/uc/userInfo";
                    });
                }else {
                    $.toast(result.message);
                }
            }
        });
    })
});
